<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Web Worker</title>
    <script>
        let worker = new Worker('./fibonacci.js');
        worker.onmessage = function (e) {
            console.log(e);
            let div = document.getElementById('message');
            div.innerHTML = e.data;
        }
        worker.postMessage(20);
    </script>
</head>

<body>
    <div id="message"></div>
</body>

</html>